package com.ruoyi.conmentsComplain.service.impl;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.conmentsComplain.mapper.CommentsComplainMapper;
import com.ruoyi.conmentsComplain.domain.CommentsComplain;
import com.ruoyi.conmentsComplain.service.ICommentsComplainService;
import com.ruoyi.common.core.text.Convert;

/**
 * 回复举报 服务层实现
 * 
 * @author ruoyi
 * @date 2019-10-15
 */
@Service
public class CommentsComplainServiceImpl implements ICommentsComplainService 
{
	@Autowired
	private CommentsComplainMapper commentsComplainMapper;

	/**
     * 查询回复举报信息
     * 
     * @param id 回复举报ID
     * @return 回复举报信息
     */
    @Override
	public CommentsComplain selectCommentsComplainById(Integer id)
	{
	    return commentsComplainMapper.selectCommentsComplainById(id);
	}
	
	/**
     * 查询回复举报列表
     * 
     * @param commentsComplain 回复举报信息
     * @return 回复举报集合
     */
	@Override
	public List<CommentsComplain> selectCommentsComplainList(CommentsComplain commentsComplain)
	{
	    return commentsComplainMapper.selectCommentsComplainList(commentsComplain);
	}
	
    /**
     * 新增回复举报
     * 
     * @param commentsComplain 回复举报信息
     * @return 结果
     */
	@Override
	public int insertCommentsComplain(CommentsComplain commentsComplain)
	{
	    return commentsComplainMapper.insertCommentsComplain(commentsComplain);
	}
	
	/**
     * 修改回复举报
     * 
     * @param commentsComplain 回复举报信息
     * @return 结果
     */
	@Override
	public int updateCommentsComplain(CommentsComplain commentsComplain)
	{
	    return commentsComplainMapper.updateCommentsComplain(commentsComplain);
	}

	/**
     * 删除回复举报对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteCommentsComplainByIds(String ids)
	{
		return commentsComplainMapper.deleteCommentsComplainByIds(Convert.toStrArray(ids));
	}

	public int updateComplainVerify(@Param("verifyState") Integer verifyState, @Param("commentId") Integer commentId) {
		return commentsComplainMapper.updateComplainVerify(verifyState,commentId);
	};
	
}
